package com.example.sunsg.okhttptest.bean;

import android.os.RemoteException;

import com.example.sunsg.okhttptest.IMyAidlInterfaceAddBook;
import com.example.sunsg.okhttptest.IMyAidlInterfaceAddBookCallBack;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * Created by sunsg on 15/12/8.
 */
public class IMyInterfaceAddBookImpl extends IMyAidlInterfaceAddBook.Stub{
    private CopyOnWriteArrayList<Book> list = new CopyOnWriteArrayList<Book>();
    @Override
    public void addBook(Book book) throws RemoteException {
        list.add(book);
    }

    @Override
    public List<Book> getBooks() throws RemoteException {
        return list;
    }

    @Override
    public void registerLintener(IMyAidlInterfaceAddBookCallBack callBack) throws RemoteException {

    }

    @Override
    public void unregisterListener(IMyAidlInterfaceAddBookCallBack callBack) throws RemoteException {

    }
}
